# coding: utf-8
data = 2
match data:
    case 1:
        print("1")
    case 2:
        print("2")
    case _:
        print("other")

d1 = {'a': 10, 'b': 20}
d2 = {'c': 30, 'd': 40}
d3 = d1 | d2
print(d3)

# fruits = {'apple', 'orange', 'pear', 'grape'}
fruits = ['apple', 'orange', 'pear', 'grape']
counts = [10, 3, 4, 5]
for f, c in zip(fruits, counts):
    match f, c:
        case 'apple', 10:
            print('10个苹果')
        case 'orange', 3:
            print('3个桔子')
        case 'pear', 4:
            print('4个梨')
        case 'grape', 5:
            print('5串葡荷')